<template>
  <view class="pages">
    <custom-bar title="学习" back-icon=""></custom-bar>
    <view class="header">
      <text>banner</text>
      <u-swiper
        previousMargin="60"
        nextMargin="60"
        radius="5"
        bgColor="#ffffff"
        :list="list"
        height="260"
        keyName="url"
        :autoplay="false"
        showTitle
        circular
      ></u-swiper>
    </view>
  </view>
</template>

<script lang="ts">
import { Component, Vue } from "vue-property-decorator";
@Component({
  components: {},
})
export default class Learn extends Vue {
  public list: Array<object | string> = [
    {
      url: "https://cdn.uviewui.com/uview/swiper/swiper1.png",
      title: "昨夜星辰昨夜风，画楼西畔桂堂东",
      poster: "https://cdn.uviewui.com/uview/swiper/swiper1.png",
      type: "image",
    },
    {
      url: "https://cdn.uviewui.com/uview/swiper/swiper2.png",
      title: "身无彩凤双飞翼，心有灵犀一点通",
      type: "image",
    },
    {
      url: "https://cdn.uviewui.com/uview/swiper/swiper3.png",
      title: "谁念西风独自凉，萧萧黄叶闭疏窗，沉思往事立残阳",
    },
  ];
  constructor() {
    super();
    this.list = [
      {
        url: "https://cdn.uviewui.com/uview/swiper/swiper1.png",
        title: "昨夜星辰昨夜风，画楼西畔桂堂东",
        poster: "https://cdn.uviewui.com/uview/swiper/swiper1.png",
        type: "image",
      },
      {
        url: "https://cdn.uviewui.com/uview/swiper/swiper2.png",
        title: "身无彩凤双飞翼，心有灵犀一点通",
        type: "image",
      },
      {
        url: "https://cdn.uviewui.com/uview/swiper/swiper3.png",
        title: "谁念西风独自凉，萧萧黄叶闭疏窗，沉思往事立残阳",
      },
    ];
  }
  created() {
    // (this as any).$api.login({ name: "ztf" }).then((res: any) => {
    //   console.log("res", res);
    // });
  }
}
</script>

<style lang="scss" scoped>
.pages {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 100vh;
  background: #f0f0f0;
  .header {
    padding: 16rpx;
    height: auto;
  }
}
</style>
